export default {
    onShareAppMessage() {
        const { shareTitle, shareImageUrl } = this.conf || {};

        if (!this.token) {
            return this.$refs['popup-red-package'].open(true);
        } else if (this.userInfo.subsidiesAmount == 0) {
            return this.$refs['popup-red-package'].open(true);
        } else {
            this.$refs['popup-red-package'].open(true);
        }

        return {
            title: shareTitle || '5G专享',
            path: `/pages/index/home?pId=${this.pId}`,
            imageUrl: shareImageUrl
        };
    }
};
